<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>he test suite</title>
		<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
	</head>
	<body>
		<div id="qunit"></div>
		<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
		<script src="../he.js"></script>
		<script>
			QUnit.urlParams.norequire = /[?&]norequire=true(?:&|$)/.test(location.search);

			document.write(QUnit.urlParams.norequire
				? '<script src="tests.js"><\/script>'
				: '<script src="../node_modules/requirejs/require.js"><\/script>'
			);
		</script>
		<script>
			(function(root) {
				if (!root.require) {
					return;
				}
				QUnit.config.autostart = false;

				requirejs.config({
					'baseUrl': './',
					'urlArgs': 't=' + (+new Date),
					'waitSeconds': 0,
					'packages': [
						{
							'name': 'he',
							'location': '..',
							'main': 'he'
						},
						{
							'name': 'tests',
							'location': '.',
							'main': 'tests'
						}
					]
				});

				require(['he'], function(he) {
					root.he = he;
					require(['tests'], function() {
						QUnit.start();
					});
				});
			}(this));
		</script>
	</body>
</html>
